<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>登录</title>
    <link rel="icon" href="../../module/favicon.ico" type="image/ico">
    <link href="../../module/css/bootstrap.min.css" rel="stylesheet">
    <link href="../../module/css/materialdesignicons.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../module/js/jconfirm/jquery-confirm.min.css">
    <link href="../../module/css/style.min.css" rel="stylesheet">
    <script type="text/javascript" src="../../module/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../module/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../module/js/perfect-scrollbar.min.js"></script>
    <script type="text/javascript" src="../../module/js/jconfirm/jquery-confirm.min.js"></script>
    <script type="text/javascript" src="../../module/js/main.min.js"></script>
    <script type="text/javascript" src="../../module/js/Chart.js"></script>
    <script type="text/javascript" src="../../js/base.js"></script>
    <script type="text/javascript" src="../../js/user/user-ajax.js"></script>
    <style>
        .lyear-wrapper {
            position: relative;
        }

        .lyear-login {
            display: flex !important;
            min-height: 100vh;
            align-items: center !important;
            justify-content: center !important;
        }

        .login-center {
            background: #fff;
            min-width: 38.25rem;
            padding: 2.14286em 3.57143em;
            border-radius: 5px;
            margin: 2.85714em 0;
        }

        .login-header {
            margin-bottom: 1.5rem !important;
        }

        .login-center .has-feedback.feedback-left .form-control {
            padding-left: 38px;
            padding-right: 12px;
        }

        .login-center .has-feedback.feedback-left .form-control-feedback {
            left: 0;
            right: auto;
            width: 38px;
            height: 38px;
            line-height: 38px;
            z-index: 4;
            color: #dcdcdc;
        }

        .login-center .has-feedback.feedback-left.row .form-control-feedback {
            left: 15px;
        }
    </style>
</head>
<body class="lyear-layout-sidebar-close">
<div class="row lyear-wrapper">
    <div class="lyear-login">
        <div class="login-center">
            <div class="login-header text-center">
                <a href="../../index.html"> <img alt="light year admin" src="/static/logo.png" style="height: 50px;">
                </a>
            </div>
            <div>
                <div class="form-group has-feedback feedback-left">
                    <input type="text" placeholder="请输入您的邮箱/手机号" class="form-control" id="parameter-input"/>
                    <span class="mdi mdi-comment-processing-outline form-control-feedback" aria-hidden="true"></span>
                </div>
                <div class="form-group has-feedback feedback-left row">
                    <div class="col-xs-8">
                        <input type="text" id="turing-input" class="form-control" placeholder="图形验证码">
                        <span class="mdi mdi-check-all form-control-feedback" aria-hidden="true"></span>
                    </div>
                    <div class="col-xs-4">
                        <img id="verification_img" src="
jwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAs4SURBVHhe7ZwLdqu6Doadu85oQoZTkuEEhlPo
cIDp9P7yC2FsAXm0vefqW4vdhoAty/pt2dB9+gZGUZQs//E/FUXJoAJRFAEViKIIqEAURUAFoigC
KhBFEVCBKIqACkRRBFQgiiKgAlEUARWIogioQBRFQAWiKAIqEEURUIEoioAKRFEEVCCKIqACURQB
FYiiCKhAFEVABaIoAioQRRFQgSiKgApEUQRUIIoioAJRFIGHBNJfT+Z0upjLtTfj6E++kbG9msvl
Yq4t6vPnXk1/RXuydfTmivOXy9W0/TtqH017vZorjt6f+XnmNr6lif/L0P/Ne5SuNvT/+eKovpvB
n3wnXe3rw1E13++octGmjtfQfdes7sVXEkPzXdf19lGFeumoUds76L67BraXjH/GvwPK7nC8oFMG
2FFVFY4H+jjcW+/0YLh+I4Af+s+raQbB5AFqA9fg3zfTX83JVliZZhjMvXKnX0lsU9WYYbijpgBG
15Mb3eFMM7DKxxajboMhd3UPBzMERmd3Gb9/Pm/qzpBCn4NmojaZ/TxTH2eGuhtMB1XOMDvQgqq5
w8YjtgT/VKZuPk3n2zf27cEZdzI9vz7x6VZ5Uz/P/FVdm7P/vcR8/UZMWZkcZGiq7RGPFIprdita
Io5wT8xYGOma3AjujyqO5FXyHUYZex5HtTzvrg/flUa94bvxZS9Hq/k8otafk3CzwHJ2Sxm+hwGH
/xSIs2OuHsx0sX1oO42qh30c+2fZRmtLpqxd8ZPBlecKjG0q+L1Ut6PUJ2ueFAhNaTxo8s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mUMiL/ZvaEvBwj
rv25H7cN71JXpLtvzc3cFrFN61nj3BrSpZCbFF7DWeCFkkCjm5s9orBCekEq9aeIsLUYnpIGgqp3
pSM/OINkKcwg2ZEuHS0F7N9vFLdJ8zPIqk7MRHF0p9nnwGweyfgvrWceeVGf7fsDvmT9V6znh2aQ
QwiZQyAvkHDjwkmFlKAY3HPHborklwWS77Cy/bG+Rzo4kvFnqcPSALTp4f6W5u31gkiL8TbsGtgC
iX3L8HixQDI+Cn8y0RzwCbHHjrVA2IiVOmkukAcq6+ikovn6QuBb6AFXuB91ovP5osoeLI/P/T1I
zL0fEkhO+IXBILAIiO2ZJE9SRyiTz9oc6pfoZzpcjp8y0EMymgHgF5q9aGMh2lruhEhn/RlsIBvJ
9zRz2RNZaF0X7UouPCqQkJEUBVoaRLaAX2wcRd/gsy1nbTNnKZCtjmeO4GUWG8zKk0ckdIQN9sdm
gEMzCC2ebSe4FJKLz7VpDlzxL/d44NG1B0d1Xo/tNPtzy/69fsKgwwYndzj7tv5AzYoLh/28EKQ0
yJE7nE9pA2Lxp82xDF9mcm4x4CX1ZWMGMUXXHtk44tgBhNWRjXPGQiD8BT7312gpGMVsY5LvaHSz
RvvPETcCkcNFfTyJEwjqKeb7axajHrUXBsY/OaXO3NMBfAAgMR1qIwX7HIyPdrhEGLiwcIc4wslC
avVKQh3+458j9D0Gta24fOh/Nfm3MLat+cLP88fdnL+u5tZPducu7v7sgXbx8AOB7j4r/yr+rwWi
KFv8kXexFOVvogJRFAEViKIIqEAURUAFoigCKhBFEVCBKIqACkRRBFQgiiKgAlEUARWIogioQBRF
QAWiKAIqEEURUIEoioAKRFEEVCCKIqACURQBFYiiCKhAFEVABaIoAioQRRFQgShKEWP+CxHZj6B8
rSFtAAAAAElFTkSuQmCC" style="width: 100px;height: 38px" onclick="turing_verification_code_get()">
                    </div>
                </div>
                <div class="form-group has-feedback feedback-left row">
                    <div class="col-xs-8">
                        <input type="text" id="verification-input" class="form-control" placeholder="手机/邮箱验证码">
                        <span class="mdi mdi-check-all form-control-feedback" aria-hidden="true"></span>
                    </div>
                    <div class="col-xs-4">
                        <button class="btn btn-danger" id="get-verification-button">获取验证码</button>
                    </div>
                </div>
                <div class="form-group has-feedback feedback-left">
                    <input type="password" placeholder="请输入密码" class="form-control" id="password-input" disabled/>
                    <span class="mdi mdi-lock form-control-feedback" aria-hidden="true"></span>
                </div>
                <div class="form-group">
                    <button class="btn btn-block btn-danger" type="button" id="reset-password-button" disabled>
                        重置密码
                    </button>
                </div>
            </div>
            <div class="login-header text-center">
                <a href="login.html">
                    <button class="btn btn-cyan" style="width:100px;margin: 20px 20px 0 0">登录</button>
                </a>
                <a href="register.html">
                    <button class="btn btn-primary" style="width: 100px;margin: 20px 20px 0 20px">注册</button>
                </a>
                <a href="reset.html">
                    <button class="btn btn-danger" style="width: 100px;margin: 20px 0 0 20px" disabled>重置密码</button>
                </a>
            </div>
        </div>
    </div>
</div>
<script>
    /*发送验证码*/
    $(document).on("click", "#get-verification-button", function () {
        var parameter = document.getElementById("parameter-input").value;
        var verificationCode = document.getElementById("turing-input").value;
        if (get_verification_code(parameter, verificationCode) === 1) {
            document.getElementById("password-input").disabled = false;
            document.getElementById("reset-password-button").disabled = false;
        }
    })

    /*重置密码*/
    $(document).on("click", "#reset-password-button", function () {
        var parameter = document.getElementById("parameter-input").value;
        var verificationCode = document.getElementById("verification-input").value;
        var password = document.getElementById("password-input").value;
        if (do_reset(parameter, verificationCode, password) === 1) {
            window.location.href = "./login.html";
        }
    })


    /*获取图灵验证码*/
    function turing_verification_code_get() {
        var parameter = document.getElementById("parameter-input").value;
        var base64str = get_turing_code(parameter);
        if (base64str === null) {
        } else {
            document.getElementById("verification_img").src = 'data:image/png;base64,' + base64str;
        }
    }
</script>
</body>
</html>